﻿using SaleManagement.Controllers;
using SaleManagement.Models;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace SaleManagement.modules
{
    public partial class AddWarehouse : Form
    {
        public AddWarehouse()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            WarehouseController warehouse = new WarehouseController();
            string name = txtName.Text;
            string address = txtAddress.Text;
            string comment = txtComment.Text;
            if (warehouse.insert(2, name, address, comment) == true)
            {
                label1.Text = warehouse.mess;
            }
        }
    }
}
